package com.qhong.modules.controller;

import com.qhong.modules.entity.TestUserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by qhong on 2018/6/21 10:58
 **/
@RestController
@RequestMapping("/test")
public class TestController {

	@Autowired
	private TestUserInfo testUserInfo;

	@RequestMapping(value="/query",method= RequestMethod.GET)
	public Object Query(){
	   return testUserInfo;
	}

	@RequestMapping(value="/query2",method= RequestMethod.GET)
	public Object Query2(){
		testUserInfo.setName("hongda2");
		testUserInfo.setId(2L);
		return testUserInfo;
	}

	@RequestMapping(value="/query3",method= RequestMethod.GET)
	public Object Query3(){
		testUserInfo.setId(3L);
		testUserInfo.setName("hongda3");
		return testUserInfo;
	}

	@RequestMapping(value="/query4",method= RequestMethod.GET)
	public Object Query4(){
		testUserInfo.setId(4L);
		testUserInfo.setName("hongda4");
		return testUserInfo;
	}
}
